//
//  LPCTools.h
//  WALKUP
//
//  Created by 李沛池 on 2017/3/8.
//  Copyright © 2017年 WalkUp. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@class AppDelegate;

@interface LPCTools : NSObject

//显示下载标示
- (void)openStatusNetWorkLoad:(BOOL)isLoad;
//去掉空格
+ (NSString *)removeWhiteSpace:(NSString *)s;
//保存图片到相册
+ (void)saveImageToPhotos:(UIImage *)i;
//缩放图片
+ (UIImage *)scaleImage:(UIImage *)image toWidth:(int)toWidth toHeight:(int)toHeight;
//压缩图片
+ (UIImage *)imageWithImageSimple:(UIImage*)image scaledToSize:(CGSize)newSize;
///用户头像的压缩上传
+ (UIImage *)compressUserAvatar_defaultImageView:(UIImage *)defaultImageView andScaledToSize:(CGSize)newSize;
//缩放图片
+ (UIImage *)scaleImage:(UIImage *)image toScale:(float)scaleSize;
//图片裁切
+ (UIImage *)cropImageWithImg:(UIImage *)image x:(CGFloat)x y:(CGFloat)y width:(CGFloat)width height:(CGFloat)height;
//iPhone截屏
+ (UIImage *)clipScreen:(UIView *)v size:(CGSize)size;
//获取对象下的所有属性和属性内容
+ (NSDictionary *)getModelAllAttr:(id)obj;
//获取对象下的所有属性
+ (NSArray *)getModelAllAttrName:(id)obj;
//打印IOS SDK下的字体
+ (void)enumerateFont;
//屏幕比例系数
+ (CGFloat)getScale:(CGFloat)value;
//获取appDelegate全局单例
+ (AppDelegate *)shareAppDelagate;
//状态栏改变
+ (void)changeStatusBar:(BOOL)isHidden;
//打开mail
+ (void)openEmail:(NSString *)s;
//拨打电话
+ (void)openPhone:(NSString *)s;
//打开短信
+ (void)openSms:(NSString *)s;
//打开浏览器
+ (void)openBrower:(NSString *)s;
//颜色值生成图片
+ (UIImage*)imageWithColor:(UIColor*)color andSize:(CGSize)size;
//两张图 拼图  image1 在上
+ (UIImage *)addImage:(UIImage *)image1 toImage:(UIImage *)image2 img1size:(CGRect)size;
//推送间隔多少之后推送
+ (void)createLocalPushWithTimeAfter:(NSInteger)date title:(NSString *)title isDayPush:(BOOL)isDayPush  key:(NSString *)key ;
//推送日期
+ (void)createLocalPushWithTime:(NSString*) dateStr title:(NSString *)title isDayPush:(BOOL)isDayPush  key:(NSString *)key ;
//根据key移除推送
+ (void)RemoveLocalPushWithKey:(NSString*) key;
//获取推送
+ (UILocalNotification*)GetLocalPushWithKey:(NSString *)key;
//POST请求字典转为字符串格式
+ (NSString *)strRequestWithDictionary:(NSDictionary *)dict;
//设置圆角(避免离屏渲染)
+ (void)avoidOffscreen:(UIImageView *)iView image:(UIImage *)image cornerRadius:(CGFloat)cornerRadius;
//返回当前时间戳
+ (NSString *)nowTimeStampFromCurrentDate;
///根据时间戳返回字符串,时间的格式
+ (NSString *)TimeStampIntoTimeStringFormat:(NSString *)formatString andTimeStampString:(NSString *)timeStampString;
//判断字符串是否有效
+ (BOOL)stringIsValid:(NSString *)string;
//浮点形判断
+ (BOOL)isPureFloat:(NSString *)string;
///引导用户评价walkup
+ (void)guideUserIntoAppStoreEvaluateWalkup;
//切换页面动画 - 消失
+ (void)dismissWithAnimation:(UIView *)view viewController:(UIViewController *)sourceViewController pushToViewController:(UIViewController *)destinationViewController completion:(void(^)(void))completion;
//切换页面动画 - 出现
+ (void)appearWithAnimation:(UIView *)view viewController:(UIViewController *)viewController;
//缩小图片
+ (UIImage *)scaleToSize:(UIImage *)img size:(CGSize)size;
//替换非UTF8字符
+ (NSData *)replaceNoUtf8:(NSData *)data;
//手机号验证
+ (BOOL)validateMobile:(NSString *)mobileNum;
//邮箱验证
+ (BOOL)validateEmail:(NSString *)email;
//获取当前语言
+ (NSString *)getCurrentLanguage;

#pragma mark - 李沛池_OurJourney_Ver1.0.0
//放大图片 全屏显示
+(void)showImage:(UIImageView *)avatarImageView;
//截取view保存至相册
+ (void)saveImageWithView:(UIView *)view;

@end
